package com.yunduansing.demo.web.system;

import java.util.List;

import com.yunduansing.demo.entity.ButtonEntity;
import com.yunduansing.demo.model.common.ResponseModel;
import com.yunduansing.demo.service.ButtonService;
import com.yunduansing.demo.web.BaseController;

import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Api(tags = "按钮")
@RestController
public class ButtonController extends BaseController {
    @Autowired
    private ButtonService service;

    @PostMapping(value="/button/save")
    @ApiOperation("保存按钮")
    public ResponseModel save(@RequestBody List<ButtonEntity> entity) {
        return convertToResponseModel(service.save(entity), "保存失败。");
    }
    
}